

from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
import urllib
import logging
import os
import sys
import time
from gathercontroller import GatherController


class GatherHandler(webapp.RequestHandler):

  controller = GatherController()

 
  def get(self):
    self.controller.Run()
    self.response.headers['Content-Type'] = 'text/plain'
    self.response.out.write('Complete!')

#Gather.py/
address = "/Gather.py/".encode("utf-8")
application = webapp.WSGIApplication([(address, GatherHandler)], debug=True)


def main():

  run_wsgi_app(application)

nameStr = "__main__".encode("utf-8")
if __name__ == nameStr:
    main()
